package com.zg.nacos.domain.req;

import com.zg.common.core.req.BaseReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/24 15:39
 */
@ApiModel(value = "Nacos配置信息", description = "Nacos配置中心的配置项详细信息")
@Data
public class ConfigEditReq extends NacosReq {

    @ApiModelProperty(value = "配置数据ID，唯一标识", example = "zg-test.yml")
    @NotEmpty(message = "配置数据ID不能为空")
    private String dataId;

    @ApiModelProperty(value = "配置所属分组", example = "DEFAULT_GROUP")
    @NotEmpty(message = "配置所属分组不能为空")
    private String group;

    @ApiModelProperty(value = "配置内容")
    @NotEmpty(message = "配置内容不能为空")
    private String content;

    @ApiModelProperty(value = "应用名称")
    private String appName;

    @ApiModelProperty(value = "配置描述", example = "用户服务配置")
    private String desc;

    @ApiModelProperty(value = "配置类型）", example = "yaml")
    @NotEmpty(message = "配置类型不能为空")
    private String type;

    @ApiModelProperty(value = "配置ID", example = "853158781728157696")
    //@NotEmpty(message = "配置ID不能为空")
    private String id;

    @ApiModelProperty(value = "配置内容的MD5校验值", example = "efb37b132a871c2fffc36b7fe9b7e123")
    private String md5;

    @ApiModelProperty(value = "加密数据密钥", example = "")
    private String encryptedDataKey;

    @ApiModelProperty(value = "命名空间ID", example = "back")
    //@NotEmpty(message = "命名空间ID不能为空")
    private String tenant;

    @ApiModelProperty(value = "命名空间ID", example = "back")
    @NotEmpty(message = "命名空间ID不能为空")
    private String namespaceId;

    @ApiModelProperty(value = "创建时间（时间戳）", example = "1750750454876")
    private Long createTime;

    @ApiModelProperty(value = "修改时间（时间戳）", example = "1750750454876")
    private Long modifyTime;

    @ApiModelProperty(value = "创建者", example = "nacos")
    private String createUser;

    @ApiModelProperty(value = "创建者IP", example = "127.0.0.1")
    private String createIp;

    @ApiModelProperty(value = "配置用途", example = "")
    private String use;

    @ApiModelProperty(value = "配置生效状态", example = "")
    private String effect;

    @ApiModelProperty(value = "配置模式", example = "")
    private String schema;

    @ApiModelProperty(value = "配置标签", example = "")
    private String configTags;
}
